﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace WindowsGame1
{
    static class TiroManager
    {
        public static List<Tiro> listaTiros = new List<Tiro>();
        public static Model modeloDosTiros;

        public static void CriarTiro(Vector3 posicao)
        {
            Tiro tiro = new Tiro(modeloDosTiros);
            tiro.posicao = posicao;
            listaTiros.Add(tiro);
        }


        public static void Update(GameTime gameTime)
        {
            foreach (Tiro tiroAtual in listaTiros)
            {
                tiroAtual.Update(gameTime);
            }


        }

        public static void Draw(Camera3D camera, GraphicsDevice device)
        {
            foreach (Tiro tiroAtual in listaTiros)
            {
                tiroAtual.Draw(camera, device);
            }
        }

    }
}
